/*
 * This is a printable form for use in conjunction with PrintablePage.java
 * The purpose of this form is to provide a printed sheet with each entry
 * to the carshow (actually 2 of them) for scoring by the judges.
 * It provides fields for entering the data in a similar look to the judging
 * scoring panel of the carshow UI, hopefully enabling quick workflow to
 * the entry of new scores due to this similar look.
 * 
 */
package carshow;

import java.awt.Graphics;
import java.util.HashMap;
import java.awt.print.Printable;
import java.awt.print.PageFormat;
import java.awt.print.PrinterException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * A JFrame form for use as the printed judging sheets
 * @author Wayne
 */
public class JudgingSheet extends javax.swing.JFrame implements Printable {
    
    private String CarShowName;
    private String ShowDate;
    private String EntrantNumber;
    private String ParkingLocation;
    private String Model;
    private String Make;
    private String Year;
    private String CarClass;
    private String Color;
    private boolean printed;
    private boolean debug = false;
    
    /**
     * Creates new form JudgingSheet, empty specific values
     */
    public JudgingSheet() {
        initComponents();
    }
    /**
     * Use this constructor to make new JudgingSheet pages for printing.
     * The passed values are used to populate the form display fields
     * @param showName name of the car show contest
     * @param showDate date of the contest
     * @param entrantNumber number of the contestant (Entry #)
     * @param parking parking location of the contestant
     * @param make make/brand of contestants car
     * @param model model of the contestants car
     * @param color color of the contestants car
     * @param year model year of the contestants car
     * @param cclass judging class of the contestant
     */
    public JudgingSheet(String showName, String showDate, 
            String entrantNumber, String parking, String make,
            String model, String color, String year, String cclass) {
        CarShowName=showName;
        ShowDate = showDate;
        EntrantNumber = entrantNumber;
        ParkingLocation = parking;
        Model = model;
        Color = color;
        Make = make;
        Year = year;
        CarClass = cclass;
        printed = false;
    }
    
    public void setColor(String color) {
        Color = color;
    }
    public void setMake(String make) {
        Make = make;
    }
    public void setModel(String model) {
        Model = model;
    }
    public void setYear(String year) {
        Year = year;
    }
    public void setClass(String cclass) {
        CarClass = cclass;
    }
    public void setParking(String park) {
        ParkingLocation = park;
    }
    public void setShowDate(String sdate) {
        ShowDate = sdate;
    }
    public void setShowName(String sname) {
        CarShowName = sname;
    }
    public boolean getPrinted() {
        return printed;
    }
    
    /**
     * paint this component's (JudgingSheet) objects
     * @param g 
     */
    /*protected void paintComponent(Graphics g) {
        //super.paint(g);
        // any rendering will happen to the component's area

      super.paintComponent(g);
      Graphics2D graph = (Graphics2D)g;
      int x = messageWidth/10;
      int y = fontSize*5/2;
      graph.translate(x, y);
      graph.setPaint(Color.lightGray);


    }*/

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        JudgeSheetPanel = new javax.swing.JPanel();
        EntryNumLabel2 = new javax.swing.JLabel();
        MakeLabel1 = new javax.swing.JLabel();
        ModelLabel2 = new javax.swing.JLabel();
        YearLabel1 = new javax.swing.JLabel();
        JS_EntrantNumber = new javax.swing.JTextField();
        JS_EntrantMake = new javax.swing.JTextField();
        JS_EntrantModel = new javax.swing.JTextField();
        JS_EntrantYear = new javax.swing.JTextField();
        ClassLabel1 = new javax.swing.JLabel();
        JS_EntrantClass = new javax.swing.JTextField();
        JSColorLabel = new javax.swing.JLabel();
        JS_EntrantColor = new javax.swing.JTextField();
        JS_ParkingNumLabel = new javax.swing.JLabel();
        JS_ParkingNumber = new javax.swing.JTextField();
        BodyScoreLabel1 = new javax.swing.JLabel();
        JS_BodyScore1 = new javax.swing.JTextField();
        EngineScoreLabel1 = new javax.swing.JLabel();
        JS_InteriorScore1 = new javax.swing.JTextField();
        InteriorScoreLabel1 = new javax.swing.JLabel();
        JS_EngineScore1 = new javax.swing.JTextField();
        ChassisScoreLabel1 = new javax.swing.JLabel();
        JS_ChassisScore1 = new javax.swing.JTextField();
        WheelsScoreLabel1 = new javax.swing.JLabel();
        JS_TireScore1 = new javax.swing.JTextField();
        TiresScoreLabel1 = new javax.swing.JLabel();
        JS_WheelsScore1 = new javax.swing.JTextField();
        ContestName = new javax.swing.JLabel();
        DateField = new javax.swing.JLabel();
        JSColorLabel1 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextPane1 = new javax.swing.JTextPane();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTextPane2 = new javax.swing.JTextPane();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTextPane3 = new javax.swing.JTextPane();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTextPane4 = new javax.swing.JTextPane();
        jScrollPane5 = new javax.swing.JScrollPane();
        jTextPane5 = new javax.swing.JTextPane();
        jScrollPane6 = new javax.swing.JScrollPane();
        jTextPane6 = new javax.swing.JTextPane();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        JudgeSheetPanel.setBackground(new java.awt.Color(255, 255, 255));
        JudgeSheetPanel.setName("JudgeSheetPanel"); // NOI18N

        EntryNumLabel2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        EntryNumLabel2.setText("Registration Number");

        MakeLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        MakeLabel1.setText("Make");

        ModelLabel2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        ModelLabel2.setText("Car Model");

        YearLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        YearLabel1.setText("Year");

        JS_EntrantNumber.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        JS_EntrantNumber.setText(EntrantNumber);

        JS_EntrantMake.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        JS_EntrantMake.setText(Make);

        JS_EntrantModel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        JS_EntrantModel.setText(Model);

        JS_EntrantYear.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        JS_EntrantYear.setText(Year);

        ClassLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        ClassLabel1.setText("Entry Class");

        JS_EntrantClass.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        JS_EntrantClass.setText(CarClass);
        JS_EntrantClass.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JS_EntrantClassActionPerformed(evt);
            }
        });

        JSColorLabel.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        JSColorLabel.setText("Color");

        JS_EntrantColor.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        JS_EntrantColor.setText(Color);

        JS_ParkingNumLabel.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        JS_ParkingNumLabel.setText("Parking Number");

        JS_ParkingNumber.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        JS_ParkingNumber.setText(ParkingLocation);

        BodyScoreLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        BodyScoreLabel1.setText("Body Score");
        BodyScoreLabel1.setFocusable(false);
        BodyScoreLabel1.setInheritsPopupMenu(false);
        BodyScoreLabel1.setRequestFocusEnabled(false);
        BodyScoreLabel1.setVerifyInputWhenFocusTarget(false);

        JS_BodyScore1.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(0, 0, 0)));
        JS_BodyScore1.setPreferredSize(new java.awt.Dimension(70, 70));

        EngineScoreLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        EngineScoreLabel1.setText("Engine Score");
        EngineScoreLabel1.setFocusable(false);
        EngineScoreLabel1.setInheritsPopupMenu(false);
        EngineScoreLabel1.setRequestFocusEnabled(false);
        EngineScoreLabel1.setVerifyInputWhenFocusTarget(false);

        JS_InteriorScore1.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(0, 0, 0)));

        InteriorScoreLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        InteriorScoreLabel1.setText("Interior Score");

        JS_EngineScore1.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(0, 0, 0)));

        ChassisScoreLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        ChassisScoreLabel1.setText("Chassis Score");

        JS_ChassisScore1.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(0, 0, 0)));

        WheelsScoreLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        WheelsScoreLabel1.setText("Wheels Score");

        JS_TireScore1.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(0, 0, 0)));

        TiresScoreLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        TiresScoreLabel1.setText("Tires Score");

        JS_WheelsScore1.setBorder(javax.swing.BorderFactory.createMatteBorder(5, 5, 5, 5, new java.awt.Color(0, 0, 0)));

        ContestName.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        ContestName.setText(CarShowName);
        ContestName.setFocusable(false);
        ContestName.setRequestFocusEnabled(false);
        ContestName.setVerifyInputWhenFocusTarget(false);

        DateField.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        DateField.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        DateField.setText(ShowDate);
        DateField.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);

        JSColorLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        JSColorLabel1.setText("Judge Initials");

        jTextPane1.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextPane1.setText("Engine: Condition, Quality, Cleanliness ( Engine block, Under-hood, Radiator, Air Cleaner, etc)\n             Detail / Paint (Neatness of engine compartment and arrangement) Check for overspray\n             Exhaust manifold and Headers       (20 Points Max)");
        jScrollPane1.setViewportView(jTextPane1);

        jTextPane2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextPane2.setText("Body and Paint:  Condition, Quality, Detail, Cleanliness.\n  Chrome ( Bumpers, Molding, ect) If no chrome, judge existing bumpers and exterior molding)\n  Windows ( Condition, Cleanliness)  (20 Points Max)");
        jScrollPane2.setViewportView(jTextPane2);

        jTextPane3.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextPane3.setText("Chassis and Drivetrain: Check for cleanliness of front suspension through \n        engine compartment   (20 Points Max)");
        jScrollPane3.setViewportView(jTextPane3);

        jTextPane4.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextPane4.setText("Interior: Condition, Quality, Cleanliness, Upholstery ( Carpeting, Seats, and Dash)\n   Headliner (coupes) Convertables, Top down, unless Judge want's it up\n    Trunk, Trunk area, Bed for trucks    (20 Points Max)\n               ");
        jScrollPane4.setViewportView(jTextPane4);

        jTextPane5.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextPane5.setText("Tires:  Cleanliness, Finish, Lack of damage\n                          (10 Points Max)");
        jScrollPane5.setViewportView(jTextPane5);

        jTextPane6.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextPane6.setText("Wheels:  Cleanliness, Matching components, Scratches, Missing parts, etc.\n                             (10 Points Max)");
        jScrollPane6.setViewportView(jTextPane6);

        javax.swing.GroupLayout JudgeSheetPanelLayout = new javax.swing.GroupLayout(JudgeSheetPanel);
        JudgeSheetPanel.setLayout(JudgeSheetPanelLayout);
        JudgeSheetPanelLayout.setHorizontalGroup(
            JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(EntryNumLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(JS_EntrantNumber)
                .addGap(18, 18, 18)
                .addComponent(JS_ParkingNumLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(JS_ParkingNumber)
                .addGap(681, 681, 681))
            .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, JudgeSheetPanelLayout.createSequentialGroup()
                                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 444, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 444, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(JS_InteriorScore1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(EngineScoreLabel1)
                                    .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(BodyScoreLabel1)
                                        .addComponent(JS_BodyScore1, javax.swing.GroupLayout.DEFAULT_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, JudgeSheetPanelLayout.createSequentialGroup()
                                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 444, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(ChassisScoreLabel1)
                                    .addComponent(JS_ChassisScore1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                        .addComponent(ContestName, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(173, 173, 173)
                        .addComponent(DateField, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                        .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(JSColorLabel1, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                                .addContainerGap()
                                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 445, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                                .addGap(1, 1, 1)
                                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(InteriorScoreLabel1)
                                    .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(WheelsScoreLabel1)
                                        .addComponent(JS_WheelsScore1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(TiresScoreLabel1, javax.swing.GroupLayout.Alignment.LEADING))
                                    .addComponent(JS_EngineScore1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(JS_TireScore1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                        .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(YearLabel1)
                            .addComponent(JSColorLabel, javax.swing.GroupLayout.Alignment.LEADING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                                .addComponent(JS_EntrantYear, javax.swing.GroupLayout.DEFAULT_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(16, 16, 16)
                                .addComponent(MakeLabel1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(JS_EntrantMake, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(16, 16, 16)
                                .addComponent(ModelLabel2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(JS_EntrantModel, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                                .addComponent(JS_EntrantColor, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(ClassLabel1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(JS_EntrantClass)))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        JudgeSheetPanelLayout.setVerticalGroup(
            JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JudgeSheetPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ContestName, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(DateField, javax.swing.GroupLayout.DEFAULT_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JS_ParkingNumLabel)
                    .addComponent(EntryNumLabel2)
                    .addComponent(JS_EntrantNumber, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(JS_ParkingNumber, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JS_EntrantYear, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(YearLabel1)
                    .addComponent(JS_EntrantMake, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(MakeLabel1)
                    .addComponent(JS_EntrantModel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ModelLabel2))
                .addGap(18, 18, 18)
                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JS_EntrantColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(JSColorLabel)
                    .addComponent(ClassLabel1)
                    .addComponent(JS_EntrantClass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(29, 29, 29)
                .addComponent(BodyScoreLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(JS_BodyScore1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addComponent(jScrollPane2))
                .addGap(18, 18, 18)
                .addComponent(EngineScoreLabel1)
                .addGap(2, 2, 2)
                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(JS_InteriorScore1, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(22, 22, 22)
                .addComponent(ChassisScoreLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 45, Short.MAX_VALUE)
                    .addComponent(JS_ChassisScore1))
                .addGap(23, 23, 23)
                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                        .addComponent(InteriorScoreLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(JS_TireScore1, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(20, 20, 20)
                .addComponent(TiresScoreLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(JS_WheelsScore1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(JudgeSheetPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(WheelsScoreLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(JS_EngineScore1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(27, 27, 27)
                        .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(JudgeSheetPanelLayout.createSequentialGroup()
                        .addGap(27, 27, 27)
                        .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(JSColorLabel1)))
                .addContainerGap(555, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(JudgeSheetPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 2074, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(122, 122, 122)
                .addComponent(JudgeSheetPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void JS_EntrantClassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JS_EntrantClassActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_JS_EntrantClassActionPerformed

    public void initPrint() {
        initComponents();
    }
    public int print(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int pageIndex) throws java.awt.print.PrinterException {
        if (pageIndex > 0) {
            return(NO_SUCH_PAGE);
        }
        else {
            if(debug) Logger.getLogger(CarShowUI.class.getName()).log(Level.INFO,"JudgePrintedSheet.print: drawing...");
            pageFormat.setOrientation(java.awt.print.PageFormat.LANDSCAPE);
            java.awt.Graphics2D graph = (java.awt.Graphics2D)graphics;
            graph.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
            JudgeSheetPanel.printAll(graph);
            printed = true;
        }
        return PAGE_EXISTS;
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel BodyScoreLabel1;
    private javax.swing.JLabel ChassisScoreLabel1;
    private javax.swing.JLabel ClassLabel1;
    private javax.swing.JLabel ContestName;
    private javax.swing.JLabel DateField;
    private javax.swing.JLabel EngineScoreLabel1;
    private javax.swing.JLabel EntryNumLabel2;
    private javax.swing.JLabel InteriorScoreLabel1;
    private javax.swing.JLabel JSColorLabel;
    private javax.swing.JLabel JSColorLabel1;
    private javax.swing.JTextField JS_BodyScore1;
    private javax.swing.JTextField JS_ChassisScore1;
    private javax.swing.JTextField JS_EngineScore1;
    private javax.swing.JTextField JS_EntrantClass;
    private javax.swing.JTextField JS_EntrantColor;
    public javax.swing.JTextField JS_EntrantMake;
    public javax.swing.JTextField JS_EntrantModel;
    private javax.swing.JTextField JS_EntrantNumber;
    private javax.swing.JTextField JS_EntrantYear;
    private javax.swing.JTextField JS_InteriorScore1;
    private javax.swing.JLabel JS_ParkingNumLabel;
    public javax.swing.JTextField JS_ParkingNumber;
    private javax.swing.JTextField JS_TireScore1;
    private javax.swing.JTextField JS_WheelsScore1;
    private javax.swing.JPanel JudgeSheetPanel;
    private javax.swing.JLabel MakeLabel1;
    private javax.swing.JLabel ModelLabel2;
    private javax.swing.JLabel TiresScoreLabel1;
    private javax.swing.JLabel WheelsScoreLabel1;
    private javax.swing.JLabel YearLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextPane jTextPane1;
    private javax.swing.JTextPane jTextPane2;
    private javax.swing.JTextPane jTextPane3;
    private javax.swing.JTextPane jTextPane4;
    private javax.swing.JTextPane jTextPane5;
    private javax.swing.JTextPane jTextPane6;
    // End of variables declaration//GEN-END:variables
}
